package com.edgar.plugin.utils;

import java.io.File;

/**
 * Created by Edgar on 2018/2/10.
 */
public final class FileUtils {

    private FileUtils(){}

    public static boolean maybeParentMkdirs(File file) {
        File parentFile = file.getParentFile();
        return parentFile.exists() || parentFile.mkdirs();
    }

    public static boolean maybeMkdirs(File file){
        return file.isDirectory() && (file.exists() || file.mkdirs());
    }
}
